package com.open.basic;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author: system
 * @Date: 2024/4/19 15:36
 * @Version: V1.0
 * @description: desc:
 */


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class BaseRequestHeader implements Serializable {

    @Serial
    private static final long serialVersionUID = 7404549807146754789L;
    /**
     * 用户ID
     */
    private String userId;

    private String username;
    /**
     * 令牌
     */
    private String token;
    /**
     * 请求ID 用于幂等
     */
    private String requestId;
    /**
     * 请求时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private long requestTime = System.currentTimeMillis();

}
